import request from '@/axios'
import type { CurdData } from './types'

export const getFieldEnumApi = (params: any) => {
  return request.get({ url: '/admin/message/fieldEnum', params })
}

export const getListApi = (params: any) => {
  return request.get({ url: '/admin/message', params })
}

export const getDetApi = (id: string): Promise<IResponse<CurdData>> => {
  return request.get({ url: '/admin/message/' + id, params: { id } })
}

export const deleteDataApi = (id: string[] | number[]): Promise<IResponse> => {
  return request.get({ url: `/admin/message/delete?ids=${id}` })
}
export const handelDataApi = (data) => {
  return request.post({ url: '/admin/message/handle', data })
}
